<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>首页 · 后台</title>
    <link rel="stylesheet" href="__ADMIN__/layui/css/layui.css">
    <link rel="stylesheet" href="__ADMIN__/frame/static/css/style.css">
    <link rel="icon" href="__ADMIN__/frame/static/image/code.png">
</head>
<body>
<!-- layout admin -->
<div class="layui-layout layui-layout-admin"> <!-- 添加skin-1类可手动修改主题为纯白，添加skin-2类可手动修改主题为蓝白 -->
    <!-- header -->
    <div class="layui-header my-header">
        <a href="index.html">
            <!--<img class="my-header-logo" src="" alt="logo">-->
            <div class="my-header-logo">集客优铺</div>
        </a>
        <div class="my-header-btn">
            <button class="layui-btn layui-btn-small btn-nav"><i class="layui-icon">&#xe65f;</i></button>
        </div>

        <!-- 顶部左侧添加选项卡监听 -->
        <ul class="layui-nav" lay-filter="side-top-left">
            <!--<li class="layui-nav-item"><a href="javascript:;" href-url="demo/btn.html"><i class="layui-icon">&#xe621;</i>按钮</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;"><i class="layui-icon">&#xe621;</i>基础</a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;" href-url="demo/btn.html"><i class="layui-icon">&#xe621;</i>按钮</a></dd>
                    <dd><a href="javascript:;" href-url="demo/form.html"><i class="layui-icon">&#xe621;</i>表单</a></dd>
                </dl>
            </li>-->
        </ul>

        <!-- 顶部右侧添加选项卡监听 -->
        <ul class="layui-nav my-header-user-nav" lay-filter="side-top-right">
            <li class="layui-nav-item">
                <a class="name" href="javascript:;"><i class="layui-icon">&#xe629;</i>主题</a>
                <dl class="layui-nav-child">
                    <dd data-skin="0"><a href="javascript:;">默认</a></dd>
                    <dd data-skin="1"><a href="javascript:;">纯白</a></dd>
                    <dd data-skin="2"><a href="javascript:;">蓝白</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a class="name" href="javascript:;">
                    {if $adminuser['avatar']}
                    <img src="{$adminuser['avatar']}" alt="logo" style="border-radius: 50%">
                    {/if}
                    {$adminuser['nick_name']}</a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;" href-url="{:url('adminuser/getuser')}"><i class="layui-icon">&#xe770;</i>个人信息</a></dd>
                    <dd><a href="javascript:;" href-url="{:url('index/index')}"><i class="layui-icon">&#xe6c9;</i>切换账户</a></dd>
                    <dd><a href="{:url('index/tuichu')}"><i class="layui-icon">&#x1006;</i>退出</a></dd>
                </dl>
            </li>
        </ul>

    </div>
    <!-- side -->
    <div class="layui-side my-side">
        <div class="layui-side-scroll">
            <!-- 左侧主菜单添加选项卡监听 -->
            <ul class="layui-nav layui-nav-tree" lay-filter="side-main">
               <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe66c;</i>分类管理</a>
                    <dl class="layui-nav-child">
                        {php}$developer = config('developer');{/php}
                        {if $developer}
                        <dd><a href="javascript:;" href-url="{:url('model/show_list')}"><i class="layui-icon">&#xe66b;</i>模型管理</a></dd>
                        {/if}
                        <!--<dd><a href="javascript:;" href-url="{:url('document/show_list')}"><i class="layui-icon">&#xe66b;</i>文档管理</a></dd>-->
                        <dd><a href="javascript:;" href-url="{:url('column/show_list')}"><i class="layui-icon">&#xe66b;</i>栏目管理</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe68e;</i>内容管理</a>
                    <dl class="layui-nav-child">
                        {foreach $data as $value}
                        <dd onclick="yinc(this,1)"><a href="javascript:;" href-url="{$value['create_url']}?cid={$value['id']}&modelid={$value['model']}"><i class="layui-icon">&#xe66b;</i>{$value['name']}</a></dd>
                        {if $value['xia']}
                        <dl class="layui-nav-child" style="display: none">
                        {foreach $value['xia'] as $v}
                            <dd><a href="javascript:;" href-url="{$value['create_url']}?cid={$v['id']}&modelid={$v['model']}">&nbsp;&nbsp;&nbsp;<i class="layui-icon">&#xe671;</i>{$v['name']}</a></dd>
                        {/foreach}
                        </dl>
                        {/if}
                        {/foreach}
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe672;</i>权限管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" href-url="{:url('rote/show_list')}"><i class="layui-icon">&#xe66b;</i>角色管理</a></dd>
                        <dd><a href="javascript:;" href-url="{:url('privilege/show_list')}"><i class="layui-icon">&#xe66b;</i>权限管理</a></dd>
                        <dd><a href="javascript:;" href-url="{:url('adminuser/show_list')}"><i class="layui-icon">&#xe66b;</i>管理员列表</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe770;</i>用户管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" href-url="{:url('user/occupation_list')}"><i class="layui-icon">&#xe66b;</i>用户职业设置</a></dd>
                        <!--<dd><a href="javascript:;" href-url="{:url('user/vip_power_list')}"><i class="layui-icon">&#xe621;</i>用户Vip权限设置</a></dd>-->
                        <!--<dd><a href="javascript:;" href-url="{:url('user/member')}"><i class="layui-icon">&#xe621;</i>用户Vip设置</a></dd>-->
                        <dd><a href="javascript:;" href-url="{:url('user/user_list')}"><i class="layui-icon">&#xe66b;</i>用户列表</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item" style="display: none">
                    <a href="javascript:;"><i class="layui-icon">&#xe638;</i>单表管理</a>
                    <dl class="layui-nav-child">
                        {if $danbiao}
                        {foreach $danbiao as $value}
                        <dd><a href="javascript:;" href-url="{:url('danbiao/show_list')}?modelid={$value['id']}"><i class="layui-icon">&#xe66b;</i>{$value['model_name']}</a></dd>
                        {/foreach}
                        {/if}
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe628;</i>联表管理</a>
                    <dl class="layui-nav-child">
                        {if $lanbiao}
                        {foreach $lanbiao as $value}
                        <dd><a href="javascript:;" href-url="{:url('lianbiao/show_list')}?modelid={$value['id']}"><i class="layui-icon">&#xe66b;</i>{$value['model_name']}</a></dd>
                        {/foreach}
                        {/if}
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe629;</i>数据库管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" href-url="{:url('database/showdata')}"><i class="layui-icon">&#xe66b;</i>数据库备份</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe716;</i>常规管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" href-url="{:url('conf/conf')}"><i class="layui-icon">&#xe66b;</i>系统配置</a></dd>
                        <dd><a href="javascript:;" href-url="{:url('conf/lst')}"><i class="layui-icon">&#xe66b;</i>配置列表</a></dd>
                        <!--<dd><a href="javascript:;" href-url="{:url('ches/index')}"><i class="layui-icon">&#xe66b;</i>测试</a></dd>-->
                    </dl>
                </li>
            </ul>

        </div>
    </div>
    <!-- body -->
    <div class="layui-body my-body">
        <div class="layui-tab layui-tab-card my-tab" lay-filter="card" lay-allowClose="true">
            <ul class="layui-tab-title">
                <li class="layui-this" lay-id="1"><span><i class="layui-icon">&#xe638;</i>欢迎页</span></li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <iframe id="iframe" src="{:url('index/welcome')}" frameborder="0"></iframe>
                </div>
            </div>
        </div>
    </div>
    <!-- footer -->
    <div class="layui-footer my-footer">
        
    </div>
</div>

<!-- pay -->
<div class="my-pay-box none">
    <div><img src="__ADMIN__/frame/static/image/zfb.png" alt="支付宝"><p>支付宝</p></div>
    <div><img src="__ADMIN__/frame/static/image/wx.png" alt="微信"><p>微信</p></div>
</div>

<!-- 右键菜单 -->
<div class="my-dblclick-box none">
    <table class="layui-tab dblclick-tab">
        <tr class="card-refresh">
            <td><i class="layui-icon">&#x1002;</i>刷新当前标签</td>
        </tr>
        <tr class="card-close">
            <td><i class="layui-icon">&#x1006;</i>关闭当前标签</td>
        </tr>
        <tr class="card-close-all">
            <td><i class="layui-icon">&#x1006;</i>关闭所有标签</td>
        </tr>
    </table>
</div>

<script type="text/javascript" src="__ADMIN__/frame/layui/layui.js"></script>
<script type="text/javascript" src="__ADMIN__/js/jquery.3.3.1.min.js"></script>
<script type="text/javascript" src="__ADMIN__/frame/static/js/vip_comm.js"></script>
<script type="text/javascript">
layui.use(['layer','vip_nav'], function () {

    // 操作对象
    var layer       = layui.layer
        ,vipNav     = layui.vip_nav
        ,$          = layui.jquery;

    // 顶部左侧菜单生成 [请求地址,过滤ID,是否展开,携带参数]
    vipNav.top_left('./json/nav_top_left.json','side-top-left',false);
    // 主体菜单生成 [请求地址,过滤ID,是否展开,携带参数]
    vipNav.main('./json/nav_main.json','side-main',true);

    // you code ...


});
function yinc(obj,num) {
if($(obj).next().attr('class')=='layui-nav-child'){
    if(num==1){
        $(obj).next().show();
        $(obj).attr('onclick','yinc(this,2)');
        }else {
        $(obj).next().hide();
        $(obj).attr('onclick','yinc(this,1)');
    }
    }
}
</script>
</body>
</html>